package cn.kailangtu.myapplication.data;

import android.os.SystemClock;

import org.greenrobot.eventbus.EventBus;

import java.util.Random;

import cn.kailangtu.myapplication.events.SerialDataRS481;

public class MainData {

    public static void Test()
    {
        new Thread(new Runnable() {
            Random r = new Random();
            @Override
            public void run() {
                SystemClock.sleep(10000);
                while(true){
                    byte[] data = new byte[2];
                    data[0] = (byte)r.nextInt(255);
                    data[1] = (byte)r.nextInt(255);
                    SystemClock.sleep(3000);
                    EventBus.getDefault().post(new SerialDataRS481(data));
                }
            }
        }).start();
    }
}
